<?php
	
	session_start();
	if(!isset($_SESSION['TypeUserLogged']) || $_SESSION['TypeUserLogged'] == "Candidato"){
	
		header("location: ../empresa/acesso-negado");
		exit;
	
	}
	
	require_once("../inc/conecta.inc.php");
	
	for($i=0; $i<count($_POST['idvagas']); $i++){
		
		mysql_query("UPDATE `vagas` SET `status` = 'Bloqueado' WHERE `empresa_idempresa` = ".$_SESSION['IdBusinessLogged']." AND `idvagas` = ".$_POST['idvagas'][$i]);
	
	}
	
	header("location: ../area-da-empresa/status/update");	
	
?>